import * as path from "path";
module.exports = {
  webpack: {
    alias: {
      "@": path.resolve(__dirname, "src/"),
    },
  },
  devServer: {
    proxy: {
      "/api": {
        // target: "http://api.data.ielee.com/",
        target: "http://172.20.10.12:8083",
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
    //子应用配置跨域支持
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
      "Access-Control-Allow-Headers":
        "X-Requested-With, content-type, Authorization",
    },
  },
};
